# 6  定义一个函数, 打印输出n以内的斐波那契数列;
n = int(input())
f1 = 0
f2 = 1
fn = 1
# print(f1)
while fn < n:
    print(fn)
    fn = f2 + f1
    f1, f2 = f2, fn

